<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index12-数组</title>
</head>
<body>
    <script type="text/javascript">

        // let arr = [10,20, 30, 40, 50];
        // console.log(arr.push(60));
        // console.log(arr);
        // console.log(arr.pop());
        // console.log(arr) ;
        // let arr3 = [10,20, 30, 40, 50];
        // console.log(arr3.shift());
        // console.log(arr3);
        // console.log(arr3.unshift(5));
        // console.log(arr3);
        // let arr4 = [10, 20, 30, 40, 50];
        // console.log(arr4.splice(2, 2));
        // console.log(arr4);
        // let str = '1,2,3,4,5';
        // console.log(str.split(','));
        // let arr = [2,10,6,1,4,22,3];
        // // console.log(arr.sort());
        // // console.log(arr);
        // // console.log(arr.sort((a, b) => a - b));
        // console.log(arr.sort((a, b) => b - a));
        // let arr5 = [10, 20, 30, 40, 50];
        // console.log(arr5.reverse());
        // console.log(arr5);
        // let arr6 = [1,2,3,4,5];
        // let arr7 = arr6.filter((value, index) => value < 3);
        // console.log(arr7);
        // console.log(Array.of(1, 2, 3, 4, 5, 6));
        // console.log(Array.of());
        // console.log(Array.from([1, , 3]));
        // let map = new Map();
        // map.set('k1', 'v1');
        // map.set('k2', 'v2');
        // console.log(Array.from(map));
        // let set = new Set();
        // set.add(1);
        // set.add(2);
        // set.add(3);
        // console.log(Array.from(set));
        let arr8 = [1,2,3,4,5];
        // console.log(arr8.find(value => value > 2));
        // console.log(arr8.findIndex(value => value > 2));
        // console.log(arr8.fill(0, 1, 3));
        // for (let [key, value] of arr8.entries()) {
        //     console.log(key, value);
        // }
        // let entries = arr8.entries();
        // console.log(entries.next().value);
        // console.log(entries.next().value);
        // for (let key of arr8.keys()) {
        //     console.log(key)
        // }
        // for (let value of arr8.values()) {
        //     console.log(value);
        // }
        console.log(arr8.includes(2));
        console.log(arr8.includes(20));
        console.log(arr8.includes(2, 2));
    </script>
</body>
</html>